unless defined?(RediPress)
  raise "You can't load this file. Please load the redipress file instead."
end

module RediPress
  # This class is intended for use by configurations using selectable parameters.
  #
  class SimpleOption
    # Define the name and slug attributes for reading
    #
    attr_reader :name, :slug

    # Setup an instance of this class with a name and an option.
    # The name will be shown in the list of options.
    #
    # Arguments:
    #   name: (String|Symbol)
    #   slug: (String|Symbol)
    #
    # Example:
    #   >> RediPress::SimpleOption.new('RediPress', :redipress)
    #   => #<RediPress::SimpleOption:0x00000000000000>
    #
    def initialize(name, slug)
      @name = name.to_s
      @slug = slug.to_s
    end

    # Convert the object to a string
    #
    # Example:
    #   >> option.to_s
    #   => 'RediPress'
    #
    def to_s
      @name
    end
  end
end
